﻿package com.dykj.platform.framework.dao;

import javax.sql.DataSource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.jdbc.core.JdbcTemplate;

import com.dykj.platform.framework.dao.support.Dialect;
/**
 * @Title: DYKJ Platform
 * @Description: 抽象数据访问类
 * @Copyright: Copyright (c) 2008
 * @Company: DYKJ
 * @author jit@dykj.cn
 * @version 1.0
 */
public abstract class AbstractDBAccess implements IDBAccess {

	/**
	 * 数据源
	 */
	protected DataSource dataSource = null;
	
	/**
	 * 数据库类型
	 */
    protected String dbType = null;
    
    /**
	 * 模板
	 */
    protected Object template = null;
    
    /**
	 * 数据库方言
	 */
    protected Dialect dialect = null;
    
    /**
	 * jdbc模板
	 */
    protected JdbcTemplate jdbcTemplate = null;
    
    protected Log log = LogFactory.getLog(this.getClass());
    
	public AbstractDBAccess() {
	}

	public void setDataSource(DataSource datasource) {
		this.dataSource = datasource;
	}

	public void setDbType(String dbType) {
		this.dbType = dbType;
	}

	public void setDialect(Dialect dialect) {
		this.dialect = dialect;
	}

	public void setTemplate(Object template) {
		this.template = template;
	}

	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}
}
